<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<body>
<h1>jianglai BBS</h1><br/>
<a href="/login/adminIndex.do">首页</a>
<c:if test="${user != null}">
    ${user.nickName}  <a href="/login/logout.do">登出</a>
</c:if><br/>
<a href="/resource/add.do">添加资源</a>
<p>
<c:forEach items="${resourceList}" var="res" varStatus="index">
    ${index.index+1}、${res.name}&nbsp;<a href="/resource/update/${res.id}">修改</a>&nbsp;<a href="/resource/delete/${res.id}">删除</a><br/>
</c:forEach>
</p>
</body>
</html>
